package com.qianyu.project.web.controller.lyz;

import com.qianyu.project.entity.MaterialInfo;
import com.qianyu.project.service.IMaterialInfoService;
import com.qianyu.project.utils.Result;
import com.qianyu.project.utils.ResultTool;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author lyz
 * @date create in 2021/2/1 9:37
 */
@RestController
@RequestMapping("/MaterialInfo")
public class MaterialInfoController {
    @Autowired
    private IMaterialInfoService service;

    @GetMapping("")
    /**
     *
     * description:  <br/>
     * author: lyz   <br/>
     * date: 2021/2/1 <br/>
     * params:  <br/>
     * return: 材料信息的list
     */
    public Result getMaterialInfoList(){
        return ResultTool.success(service.list());
    }
}
